package pattern.behavioral.strategy.withabstract;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 银牌会员价格策略，9折,需要运费
 * @author: chaoyang.ren  
 * @date:Jun 1, 2017  
 * @time:4:30:40 PM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public class SilverMemberPriceStrategy extends AbstractFreightPriceStrategy implements PriceStrategy{

	public BigDecimal getPrice(BigDecimal price) {
		BigDecimal result = price.multiply(BigDecimal.valueOf(0.9d)).setScale(2, RoundingMode.UP);
		result = super.calculateFreight(result);
		System.out.println("银牌会员的价格：" + result);
		return result;
	}

}

